package com.ruoyi.wuyi.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wuyi.mapper.WyNongyaoInfoMapper;
import com.ruoyi.wuyi.domain.WyNongyaoInfo;
import com.ruoyi.wuyi.service.IWyNongyaoInfoService;

/**
 * 农药信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-07-15
 */
@Service
public class WyNongyaoInfoServiceImpl implements IWyNongyaoInfoService 
{
    @Autowired
    private WyNongyaoInfoMapper wyNongyaoInfoMapper;

    /**
     * 查询农药信息
     * 
     * @param id 农药信息主键
     * @return 农药信息
     */
    @Override
    public WyNongyaoInfo selectWyNongyaoInfoById(Integer id)
    {
        return wyNongyaoInfoMapper.selectWyNongyaoInfoById(id);
    }

    /**
     * 查询农药信息列表
     * 
     * @param wyNongyaoInfo 农药信息
     * @return 农药信息
     */
    @Override
    public List<WyNongyaoInfo> selectWyNongyaoInfoList(WyNongyaoInfo wyNongyaoInfo)
    {
        return wyNongyaoInfoMapper.selectWyNongyaoInfoList(wyNongyaoInfo);
    }

    /**
     * 新增农药信息
     * 
     * @param wyNongyaoInfo 农药信息
     * @return 结果
     */
    @Override
    public int insertWyNongyaoInfo(WyNongyaoInfo wyNongyaoInfo)
    {
        return wyNongyaoInfoMapper.insertWyNongyaoInfo(wyNongyaoInfo);
    }

    /**
     * 修改农药信息
     * 
     * @param wyNongyaoInfo 农药信息
     * @return 结果
     */
    @Override
    public int updateWyNongyaoInfo(WyNongyaoInfo wyNongyaoInfo)
    {
        return wyNongyaoInfoMapper.updateWyNongyaoInfo(wyNongyaoInfo);
    }

    /**
     * 批量删除农药信息
     * 
     * @param ids 需要删除的农药信息主键
     * @return 结果
     */
    @Override
    public int deleteWyNongyaoInfoByIds(Integer[] ids)
    {
        return wyNongyaoInfoMapper.deleteWyNongyaoInfoByIds(ids);
    }

    /**
     * 删除农药信息信息
     * 
     * @param id 农药信息主键
     * @return 结果
     */
    @Override
    public int deleteWyNongyaoInfoById(Integer id)
    {
        return wyNongyaoInfoMapper.deleteWyNongyaoInfoById(id);
    }
}
